home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
C
/
LIB
/
UNIXLIB37B
/
!UnixLib37
/
src
/
c
/
psignal
< prev
next >
Wrap
Text File
|
1996-11-09
|
1KB
|
40 lines
/****************************************************************************
*
* $Source: /unixb/home/unixlib/source/unixlib37/src/c/RCS/psignal,v $
* $Date: 1996/05/06 09:03:13 $
* $Revision: 1.1 $
* $State: Rel $
* $Author: unixlib $
*
* $Log: psignal,v $
* Revision 1.1 1996/05/06 09:03:13 unixlib
* Initial revision
*
***************************************************************************/
static const char rcs_id[] = "$Id: psignal,v 1.1 1996/05/06 09:03:13 unixlib Rel $";
#include <stdio.h>
#include <signal.h>
#include <string.h>
/* Print out on stderr a line consisting of the test in S, a colon, a space,
a message describing the meaning of the signal number SIG and a newline.
If S is NULL or "", the colon and space are omitted. */
void
psignal (int sig, register const char *s)
{
const char *colon;
if (s == NULL || s == '\0')
s = colon = "";
else
colon = ": ";
if (sig >= 0 && sig < NSIG)
fprintf (stderr, "%s%s%s\n", s, colon, sys_siglist[sig]);
else
fprintf (stderr, "%s%sUnknown signal %d\n", s, colon, sig);
}